#include<stdio.h>

void order(float a[],int n){
	int i=0,kg=0,t,j;
	for(i=0;i<n-1;i++){
		kg=1;
		for(j=0;j<n-1-i;j++){
			if(a[j]>a[j+1]){
				t=a[j];
				a[j]=a[j+1];
				a[j+1]=t;
				kg=0;
			}
		}
		if(kg==1) break;
	}
}
int main()
{
	int n,c,sign=1;
	float sum=0,f[10];
	scanf("%d",&n);
	for(;sign<=n;sign++){
		scanf("%d",&c);
		f[sign-1]=9.0/5*c+32;
		sum+=f[sign-1];
		printf("%.1f",f[sign-1]);
		if(sign!=n) printf(" ");
		if(sign%5==0) printf("\n");
	}
	printf("\n");
	order(f,n);
	printf("%.1f %.1f %.1f",f[0],f[n-1],sum/n);
	return 0;
}
